package org.telegram.bot.utils;

import java.util.Arrays;
import java.util.List;

/**
 * @Author: wyx
 * @Date: 2023/5/28 0:11
 */
public class BotCMDUtil {

    /**
     * 机器人命令前缀
     */
    public static final String CMD_PREFIX = "/";
    
    //指令列表
    public static final String CMD_BLACKLIST = CMD_PREFIX+"block";
    public static final String CMD_START = CMD_PREFIX+"start";
    public static final String CMD_BAN = CMD_PREFIX+"ban";
    public static final List<String> MAIN_MENU= Arrays.asList(CMD_BLACKLIST,CMD_START,CMD_BAN);
    
    //命令权限
    public static final String PERMISSIONS_NOT_ADMIN = "无权限，仅管理员操作！\n如确认是群组管理员角色，请发送指令 /start 重载配置后再尝试！";
    public static final String PERMISSIONS_ERROR_CHAT_TYPE = "当前模式不支持此命令";
    public static final String PERMISSIONS_SUCCESS = "执行成功";
    public static final String PERMISSIONS_USER_IS_ADMIN = "该用户是群组管理员，无法执行此操作。";
    /**
     * 判断是否对应权限
     * @param cmd
     * @param botIdName
     * @return
     */
    public static Boolean validCmd(String cmd,String cmdType,String botIdName){
        return cmdType.equals(cmd) || cmd.contains(cmdType+"@"+botIdName);
    }
}
